﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WpfComm.Models
{
    public class SerialPortSet
    {
        private int _portname_choose;
        //串口号
        public int portname_choose
        {
            get { return _portname_choose; }
            set
            {
                _portname_choose = value;
                //this.OnPropertyChanged("portname_choose");
            }
        }

        private int _partity_choose;
        //校验位
        public int partity_choose
        {
            get { return _partity_choose; }
            set
            {
                _partity_choose = value;
                //this.OnPropertyChanged("partity_choose");
            }
        }

        private int _baudrate_choose;
        //波特率 
        public int baudrate_choose
        {
            get { return _baudrate_choose; }
            set
            {
                _baudrate_choose = value;
                //this.OnPropertyChanged("baudrate_choose");
            }
        }

        private int _databits_choose;
        //数据位
        public int databits_choose
        {
            get { return _databits_choose; }
            set
            {
                _databits_choose = value;
                //this.OnPropertyChanged("databits_choose");
            }
        }

        private int _stopbits_choose;
        //停止位
        public int stopbits_choose
        {
            get { return _stopbits_choose; }
            set
            {
                _stopbits_choose = value;
                //this.OnPropertyChanged("stopbits_choose");
            }
        }

        private Boolean blSaveHex;
        //十六进制接收
        public Boolean BLSaveHex
        {
            get { return blSaveHex; }
            set
            {
                blSaveHex = value;
                //this.OnPropertyChanged("BLSaveHex");
            }
        }

        private Boolean blSendHex;
        //十六进制发送
        public Boolean BLSendHex
        {
            get { return blSendHex; }
            set
            {
                blSendHex = value;
                //this.OnPropertyChanged("BLSendHex");
            }
        }

        public SerialPortSet()
        {
            //串口号
            portname_choose = 0;
            //校验位
            partity_choose = 0;
            //波特率 
            baudrate_choose = 0;
            //数据位
            databits_choose = 0;
            //停止位
            stopbits_choose = 1; //默认为 One （None 不受支持）
        }
    }
}
